package org.grow.bill.service.impl;

import org.grow.bill.service.CodeServiceF;
import org.springframework.stereotype.Service;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @Author: xwg
 * @CreateDate: 2025/10/13
 */

@Service
public class CodeServiceFImpl implements CodeServiceF {
    @Override
    public String next(String prefix) {
        System.out.println("出问题了，远程调用失败，采取本地备用随机数方案");
        int i = ThreadLocalRandom.current().nextInt(10000);
        return prefix + i;
    }
}
